package com.example.springspidemo.config;

import com.example.springspidemo.processor.MessageServicePostProcessor;
import com.example.springspidemo.service.MessageService;
import com.example.springspidemo.service.impl.HelloMessageServiceImpl;
import com.example.springspidemo.service.impl.HiMessageServiceImpl;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Bean;

/**
 * @Author: ZhangGongMing
 * @CreateTime: 2025/4/15 12:58
 * @Description: Spring 配置类
 * @Version: 1.0
 */
@Configuration
public class SpringConfig {
    @Bean
    public MessageService helloMessageService() {
        return new HelloMessageServiceImpl();
    }

    @Bean
    public MessageService hiMessageService() {
        return new HiMessageServiceImpl();
    }

    @Bean
    public MessageServicePostProcessor messageServicePostProcessor() {
        return new MessageServicePostProcessor();
    }
}
